<template>
  <a href="javascript:void" @click.stop="onClick">{{ value }}</a>
</template>

<script>
export default {
  props: {
    href: [String, Function],
    value: String
  },
  methods: {
    async onClick() {
      this.$router.push(
        typeof this.href === "function" ? this.href(this.value) : this.href
      );
    }
  }
};
</script>

<style></style>
